;>r6502code
; BBC 6502 to RISC OS library code
; by Michael Foot.
; Version 1.01 - (31 Mar 2001).
;

; Use the GET directive to include register definitions as if typed here

  GET h.RegNames

; Use the GET directive to include a list of SWI names as if typed here

  GET h.SWInames

; Area name C$$code advisable as wanted to link with C output

  AREA |C$$code|, CODE, READONLY

; Import global symbols

; Export global symbols

  EXPORT |bbcvdu|
  EXPORT |pushpsr|
  EXPORT |poppsr|

|bbcvdu|
  ;STMFD sp!,{lr}
  SWI OS_WriteC
  MOV pc,lr
  ;LDMFD sp!,{pc}

|pushpsr|
  ADD r0,lr,#4
  STMFD sp!,{r0}
  MOV pc,lr

|poppsr|
  LDMFD sp!,{pc}
  MOV pc,lr

;Data Area

;  AREA    |C$$data|, DATA

  END
